n = 10
DIM x(n)
FOR i = 1 TO n
x(i) = i
NEXT
FOR i = 1 TO n
PRINT x(i);
NEXT
FOR i = 1 TO n \ 2
SWAP x(i), x(n - i + 1)
NEXT
PRINT STRING$(80, 196)
FOR i = 1 TO n
PRINT x(i);
NEXT
Тестирование выполнено в программе QB64 ( Скачать )
n = 10
DIM x(n)
FOR i = 1 TO n
x(i) = i
NEXT
FOR i = 1 TO n
PRINT x(i);
NEXT
FOR i = 1 TO n \ 2
SWAP x(i), x(n - i + 1)
NEXT
PRINT STRING$(80, 196)
FOR i = 1 TO n
PRINT x(i);
NEXT
Тестирование выполнено в программе QB64 ( Скачать )